var express     = require('express')
,   ejs         = require('ejs')
,   path        = require('path')
,   core        = require('core')
,   config      = require('./config')
,   callback    = require('./bin/callback')
,   app         = express();

// 设置模板
app.set('views', path.join(__dirname, 'views'));
app.engine('.html', ejs.renderFile);
app.set('view engine', 'html');

// 核心设置
core.init.call(app, config, callback);

module.exports = app;
